Skip to content

refactor: replace RouterUtils with ObservabilityRouterClassBase for navigation paths#27956

Merged
ShaileshParmar11 merged 7 commits intomainfrom
issue-3490-supporting-pr
May 10, 2026
Merged

refactor: replace RouterUtils with ObservabilityRouterClassBase for navigation paths#27956
ShaileshParmar11 merged 7 commits intomainfrom
issue-3490-supporting-pr

Conversation

@ShaileshParmar11
Copy link
Copy Markdown
Contributor

@ShaileshParmar11 ShaileshParmar11 commented May 7, 2026

Summary

Extends ObservabilityRouterClassBase with six new path helpers and migrates all observability + data-quality callers from raw RouterUtils helpers / ROUTES.* literals to the singleton, so navigation paths for these pages now flow through a single abstraction.

This is the OpenMetadata-side change that enables downstream embedding of observability pages inside Collate's AskCollate experience, where a Collate-side override of ObservabilityRouterClassBase rewrites paths to a different prefix when in embedded mode. Stand-alone OpenMetadata behavior is unchanged — the base class just delegates to the existing RouterUtils helpers and ROUTES constants.

What changed

New methods on ObservabilityRouterClassBase (each delegates to its existing RouterUtils / ROUTES counterpart):

  • getTestSuitePath(fqn)
  • getTestCaseDetailPagePath(fqn, tab?)
  • getTestCaseVersionPath(fqn, version, tab?)
  • getTestCaseDimensionsDetailPagePath(fqn, dimensionKey, tab?)
  • getIncidentManagerPath()
  • getObservabilityAlertsListPath()

Call-site migrations (raw helper/constant → singleton method) across:

  • pages/DataQuality/DataQualityPage.tsx
  • pages/IncidentManager/IncidentManagerDetailPage/IncidentManagerDetailPage.tsx
  • pages/AddObservabilityPage/AddObservabilityPage.tsx
  • pages/AlertDetailsPage/AlertDetailsPage.tsx
  • pages/TestSuiteDetailsPage/TestSuiteDetailsPage.component.tsx
  • components/IncidentManager/IncidentManager.component.tsx
  • components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx
  • components/DataQuality/TestSuite/TestSuiteList/TestSuites.component.tsx
  • components/DataQuality/AddToBundleSuiteModal/AddToBundleSuiteModal.component.tsx
  • components/DataQuality/IncidentManager/FailedTestCaseSampleData/FailedTestCaseSampleData.component.tsx
  • components/Database/Profiler/DataQualityTab/DataQualityTab.tsx
  • components/Database/Profiler/TestSummaryCustomTooltip/TestSummaryCustomTooltip.component.tsx
  • components/Explore/EntitySummaryPanel/DataQualityTab/DataQualityTab.tsx

The standalone helpers in RouterUtils are left exported and untouched — only the callers we wanted centralized were migrated. Out-of-scope callers (utility modules, contracts UI, destination pages outside the observability tree) continue to use the standalone helpers.

Type of change

  • Refactor (no functional/behavioral change for OpenMetadata standalone)
  • Bug fix
  • New feature
  • Breaking change

Test plan

Unit tests extended to cover every new method and every migrated call site:

  • ObservabilityRouterClassBase.test.ts: 20 cases (was 11) — covers all six new wrapper methods including default-tab fallback paths and singleton identity.
  • Sibling component tests added or extended for each migrated file: TestSuites, AddToBundleSuiteModal, IncidentManager, FailedTestCaseSampleData (new test file), TestSummaryCustomTooltip, DataQualityDashboard (covers both IncidentTypeAreaChartWidget drill-down paths), and TestSuiteDetailsPage — each asserts the migrated value matches what observabilityRouterClassBase.<method>(...) produces.
  • Full Jest suite: 10,714 / 10,714 passing, 0 failing. TypeScript clean.
  • UI checkstyle: green after make ui-checkstyle-changed.

Why now

The base/override pattern is already in place (setEmbeddedMode / isEmbeddedMode and four pre-existing wrapper methods). This PR finishes the surface area so consumers don't need to mix singleton calls and raw RouterUtils calls within the same page.


Summary by Gitar

  • UI Refinement:
    • Added Tailwind styling to DataQualityTab to standardize container overflow, border, and shadow properties for tables.
  • Component Migration:
    • Migrated IncidentManager table from antd to the internal core-ui Table component for improved layout control and consistency.
  • Test infrastructure:
    • Marked 'Pipeline Alert' and permission tests as slow in ObservabilityAlerts.spec.ts to improve CI stability.

This will update automatically on new commits.

Copilot AI review requested due to automatic review settings May 7, 2026 09:24
@ShaileshParmar11 ShaileshParmar11 requested a review from a team as a code owner May 7, 2026 09:24
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels May 7, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors UI navigation to route through ObservabilityRouterClassBase (instead of calling RouterUtils helpers or ROUTES constants directly) for observability + data quality related paths, centralizing route generation behind a single abstraction.

Changes:

  • Extend ObservabilityRouterClassBase with additional helpers for alerts list, incident manager, and test suite/test case navigation.
  • Update multiple pages/components to use observabilityRouterClassBase for navigation/breadcrumb URLs (test suites, test cases, incident manager, observability alerts).
  • Remove now-unneeded direct RouterUtils imports / ROUTES usages in the touched call sites.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
openmetadata-ui/src/main/resources/ui/src/utils/ObservabilityRouterClassBase.ts Adds new route helper methods to centralize observability/data-quality navigation paths.
openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.component.tsx Switches breadcrumb/navigation URL generation for test suite to use the router class base.
openmetadata-ui/src/main/resources/ui/src/pages/IncidentManager/IncidentManagerDetailPage/IncidentManagerDetailPage.tsx Replaces direct ROUTES/RouterUtils calls with router class base methods for incident/test-case navigation.
openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.tsx Uses router class base for navigating to test suite/test case after form actions.
openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/AlertDetailsPage.tsx Uses router class base for observability alerts list breadcrumb + post-delete navigation.
openmetadata-ui/src/main/resources/ui/src/pages/AddObservabilityPage/AddObservabilityPage.tsx Uses router class base for alerts list breadcrumb and post-save navigation to alert details.
openmetadata-ui/src/main/resources/ui/src/components/IncidentManager/IncidentManager.component.tsx Uses router class base for linking to test case detail pages from incident manager list.
openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DataQualityTab/DataQualityTab.tsx Uses router class base for linking from summary panel test case cards.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteList/TestSuites.component.tsx Uses router class base for test suite link navigation.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/FailedTestCaseSampleData/FailedTestCaseSampleData.component.tsx Uses router class base for navigating to the test case SQL query tab.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx Uses router class base for incident manager redirect paths in dashboard widgets.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/AddToBundleSuiteModal/AddToBundleSuiteModal.component.tsx Uses router class base to navigate to a selected bundle suite after adding test cases.
openmetadata-ui/src/main/resources/ui/src/components/Database/Profiler/TestSummaryCustomTooltip/TestSummaryCustomTooltip.component.tsx Uses router class base for linking to test case “Issues” tab from profiler tooltip.
openmetadata-ui/src/main/resources/ui/src/components/Database/Profiler/DataQualityTab/DataQualityTab.tsx Uses router class base for navigation to test suite/test case views from profiler DQ tab.

Comment on lines +47 to +88
public getObservabilityAlertsListPath(): string {
return ROUTES.OBSERVABILITY_ALERTS;
}

public getIncidentManagerPath(): string {
return ROUTES.INCIDENT_MANAGER;
}

public getObservabilityAlertsEditPath(fqn: string): string {
return getObservabilityAlertsEditPath(fqn);
}

public getObservabilityAlertDetailsPath(fqn: string, tab?: string): string {
return getObservabilityAlertDetailsPath(fqn, tab);
}

public getTestSuitePath(testSuiteFqn: string): string {
return getTestSuitePath(testSuiteFqn);
}

public getTestCaseDetailPagePath(
fqn: string,
tab: TestCasePageTabs = TestCasePageTabs.TEST_CASE_RESULTS
): string {
return getTestCaseDetailPagePath(fqn, tab);
}

public getTestCaseVersionPath(
fqn: string,
version: string,
tab?: string
): string {
return getTestCaseVersionPath(fqn, version, tab);
}

public getTestCaseDimensionsDetailPagePath(
fqn: string,
dimensionKey: string,
tab: TestCasePageTabs = TestCasePageTabs.TEST_CASE_RESULTS
): string {
return getTestCaseDimensionsDetailPagePath(fqn, dimensionKey, tab);
}
Comment on lines 43 to +49
public getAddObservabilityAlertsPath(): string {
return ROUTES.ADD_OBSERVABILITY_ALERTS;
}

public getObservabilityAlertsListPath(): string {
return ROUTES.OBSERVABILITY_ALERTS;
}
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.37% (64315/103109) 43% (34915/81179) 45.8% (10275/22433)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🟡 Playwright Results — all passed (13 flaky)

✅ 4072 passed · ❌ 0 failed · 🟡 13 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 761 0 7 8
🟡 Shard 3 780 0 1 7
🟡 Shard 4 789 0 1 18
✅ Shard 5 709 0 0 41
🟡 Shard 6 735 0 3 8
🟡 13 flaky test(s) (passed on retry)
  • Features/CustomizeDetailPage.spec.ts › Ml Model - customization should work (shard 1, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 1 retry)
  • Features/KnowledgeCenter.spec.ts › Article mentions in description should working for Knowledge Center (shard 2, 1 retry)
  • Features/KnowledgeCenterTextEditor.spec.ts › Rich Text Editor - Text Formatting (shard 2, 1 retry)
  • Features/KnowledgeCenterTextEditor.spec.ts › Rich Text Editor - Text Formatting (shard 2, 1 retry)
  • Features/KnowledgeCenterTextEditor.spec.ts › Rich Text Editor - Text Formatting (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Description Rule Is_Set (shard 4, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Metric (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/UserDetails.spec.ts › Create team with domain and verify visibility of inherited domain in user profile after team removal (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

Copilot AI review requested due to automatic review settings May 8, 2026 05:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated no new comments.

karanh37
karanh37 previously approved these changes May 9, 2026
Copilot AI review requested due to automatic review settings May 9, 2026 07:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated no new comments.

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 9, 2026

Code Review ✅ Approved

Centralizes navigation paths for observability and data-quality pages into ObservabilityRouterClassBase and migrates existing call-sites to the singleton abstraction. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 9, 2026

@ShaileshParmar11 ShaileshParmar11 merged commit 2967a7f into main May 10, 2026
47 checks passed
@ShaileshParmar11 ShaileshParmar11 deleted the issue-3490-supporting-pr branch May 10, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants